package com.unitech.order.api.beans;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 下订单时 订单中饮品详情 请求参数
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ItemParam implements Serializable {
    @NotNull(message = "订单中饮品信息不能为空")
    private Long id; // 饮品id
    @Min(value = 1, message = "订单中饮品数量必须大于等于1")
    private Integer quantity; // 数量
}
